package com.ruoyi.service.impl;

import com.ruoyi.domain.GoodsSkuInfo;
import com.ruoyi.mapper.GoodsSkuInfoMapper;
import com.ruoyi.service.IGoodsSkuInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

@Service
public class GoodsSkuInfoServiceImpl implements IGoodsSkuInfoService {
    @Autowired
    private GoodsSkuInfoMapper goodsSkuInfoMapper;

    @Override
    public List<GoodsSkuInfo> selectGoodsSkuInfoList(GoodsSkuInfo goodsSkuInfo) {
        return goodsSkuInfoMapper.selectGoodsSkuInfoList(goodsSkuInfo);
    }

    @Override
    public GoodsSkuInfo selectGoodsSkuInfoById(Long skuId) {
        return goodsSkuInfoMapper.selectByPrimaryKey(skuId);
    }

    @Override
    public int insertGoodsSkuInfo(GoodsSkuInfo goodsSkuInfo) {
        return goodsSkuInfoMapper.insertSelective(goodsSkuInfo);
    }

    @Override
    public int updateGoodsSkuInfo(GoodsSkuInfo goodsSkuInfo) {
        return goodsSkuInfoMapper.updateByPrimaryKeySelective(goodsSkuInfo);
    }

    @Override
    public List<GoodsSkuInfo> selectGoodsSkuList() {
        return goodsSkuInfoMapper.selectGoodsSkuList();
    }

    @Override
    public int deleteGoodsSkuInfoByIds(Long[] skuIds) {
        return goodsSkuInfoMapper.deleteByPrimaryKeys(skuIds);
    }
}
